
export abstract class Definition {
  page?: number;
  limit?: number;
  
  [key: string]: any;

  initWithObject(fields: any) {
    Object.keys(fields).forEach(key=> {
        let value = fields[key];
        this[key] = value;
      });
  }

  toObject() {
    var obj: any = {};
    Object.keys(this).forEach(key=> {
      let value = this[key];
      obj[key] = value;
    });
    return obj;
  }
}
